import { axios } from '@/utils/request'

export default {
  // 获取模版列表
  questionTemplateList (data) {
    return axios({
      url: '/q_and_a/question-template/list',
      method: 'GET',
      params: data
    })
  },
  // 新增编辑模版
  questionTemplateSave (data) {
    return axios({
      url: '/q_and_a/question-template/save',
      method: 'POST',
      data: data
    })
  },
  // 修改模版状态
  questionTemplateState (data) {
    return axios({
      url: '/q_and_a/question-template/state',
      method: 'GET',
      params: data
    })
  },
  // 删除模版
  questionTemplateDel (data) {
    return axios({
      url: '/q_and_a/question-template/del',
      method: 'GET',
      params: data
    })
  },
  // 删除模版
  catList (data) {
    return axios({
      url: '/q_and_a/cat/list',
      method: 'GET',
      params: data
    })
  },
  // 删除模版
  catSave (data) {
    return axios({
      url: '/q_and_a/cat/save',
      method: 'POST',
      data: data
    })
  },
  // 分类列表
  catList (data) {
    return axios({
      url: '/q_and_a/cat/list',
      method: 'GET',
      params: data
    })
  },
  // 分类状态修改
  catState (data) {
    return axios({
      url: '/q_and_a/cat/state',
      method: 'GET',
      params: data
    })
  },
  // 分类删除
  catDel (data) {
    return axios({
      url: '/q_and_a/cat/del',
      method: 'GET',
      params: data
    })
  },
  // 积分套餐列表
  integralRechargeList (data) {
    return axios({
      url: '/integral-recharge/list',
      method: 'GET',
      params: data
    })
  },
  // 积分套餐编辑
  integralEdit (data) {
    return axios({
      url: '/integral-recharge/edit',
      method: 'POST',
      data: data
    })
  },
  // 积分套餐删除
  integralDel (data) {
    return axios({
      url: '/integral-recharge/del',
      method: 'GET',
      params: data
    })
  },
  // 积分套餐状态编辑
  integralState (data) {
    return axios({
      url: '/integral-recharge/state',
      method: 'GET',
      params: data
    })
  },
  // 积分套餐充值记录
  integralRechargeOrder (data) {
    return axios({
      url: '/integral-recharge/integral-recharge-order',
      method: 'GET',
      params: data
    })
  },
  // 用户问答列表
  qaLogUserList (data) {
    return axios({
      url: '/q_and_a/q-a-log/user-list',
      method: 'GET',
      params: data
    })
  },
  // 用户问答详情
  qaLogQList (data) {
    return axios({
      url: '/q_and_a/q-a-log/q-list',
      method: 'GET',
      params: data
    })
  },
  // 规则设置
  setting (data, method = 'GET') {
    return axios({
      url: '/q_and_a/default/setting',
      method,
      data: method == 'GET' ? {} : data
    })
  },
  // 广告规则设置
  adSetting (data, method = 'GET') {
    return axios({
      url: '/q_and_a/default/ad-setting',
      method,
      data: method == 'GET' ? {} : data
    })
  },
  // 获取广告记录
  adLogList (data) {
    return axios({
      url: '/q_and_a/q-a-log/ad-log-list',
      method: 'GET',
      params: data
    })
  }
}
